import React, { Component } from "react";
import { Menu, Icon } from "antd";
import "./index.less";

// const { SubMenu } = Menu;

class Header extends Component {
    state = {
        current: "home"
    };
    handleClick = e => {
        console.log("click ", e);
        this.setState({
            current: e.key
        });
        window.location.hash = `/${e.key}`;
    };
    render() {
        return (
            <div>
                <Menu onClick={this.handleClick} selectedKeys={[this.state.current]} mode="horizontal">
                    <Menu.Item key="home">
                        <Icon type="global" />
                        总账税务组-A岗监控
                    </Menu.Item>
                    <Menu.Item key="paybill">
                        <Icon type="mail" />
                        应付组月监控
                    </Menu.Item>
                    <Menu.Item key="pie">
                        <Icon type="mail" />饼
                    </Menu.Item>
                </Menu>
            </div>
        );
    }
}

export default Header;
